# -- base -- #
unbind C-b
set -g prefix C-b
set -g status-keys vi
setw -g mode-keys vi
bind : command-prompt
bind r source-file ~/.tmux.conf \; display-message "Reloading..".
set -g default-terminal "screen-256color"
bind-key a send-prefix

# -- windown -- #
bind s split-window -h
bind v split-window -v
bind-key c  new-window

bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R

bind ^k resizep -U 10
bind ^j resizep -D 10
bind ^h resizep -L 10
bind ^l resizep -R 10
bind ^u swapp -U
bind ^d swapp -D

bind u choose-session
bind o choose-window
bind \ last
bind q killp

bind-key -n C-S-Left swap-window -t -1
bind-key -n C-S-Right swap-window -t +1
set -g base-index 1
setw -g pane-base-index 1
set -g history-limit 5000

# pane border
set -g pane-border-fg black
set -g pane-border-bg white
set -g pane-active-border-fg black
set -g pane-active-border-bg '#afd787'

# -- command -- #
bind m command-prompt "splitw 'exec man %%'"
bind space copy-mode
bind -t vi-copy v begin-selection
bind -t vi-copy y copy-selection
bind -t vi-copy C-v rectangle-toggle
bind ] paste-buffer

# -- statusbar --#
set -g status-justify centre
set -g status-right-attr bright
set -g status-right "%H:%M:%S %a %m-%d"
set -g status-bg default
set -g status-fg '#ffd787'
setw -g window-status-current-attr bright
setw -g window-status-current-fg black
setw -g window-status-current-bg '#afd787'
# set -g status-utf8 on
set -g status-interval 1
